<style type="text/css">
#shiftings span.error {
      position: absolute !important;
      left: 65px;
}
#shiftings tr td div {
  height: 26px;
  padding-top: 3px;
}
</style>
<div class="pageContent">
<form method="post" action="${rc.getContextPath()}/manage/performance/saveBatchPerformance" class="pageForm required-validate" onsubmit="return validateCallback(this, batchjobAjaxDone);">
    <input type="hidden" name="navTabId" value="${navTabId!''}" />
    <input type="hidden" name="workCenterCode" value="${performance.workCenterCode!''}" />
    <input type="hidden" name="theDate" value="${(performance.theDate?string('yyyy-MM-dd'))?if_exists}" />
    <table class="table" width="160%" layoutH="150">
        <thead>
            <tr>
                <th width="100"><@label key='personnelCode.C'>人员编号</@label></th>
                <th width="100"><@label key="personnelName.C">姓名</@label></th>
                <th width="80"><@label key='quantity.C'>数量</@label></th>
                <th width="100"><@label key='description.C'>备注</@label></th>
                <th width="100"><@label key='personnelTypeCode.C'>人员类型编号</@label></th>
                <th width="100"><@label key='personnelTypeText.C'>人员类型描述</@label></th>
                <th width="120"><@label key="shiftingWorkCenter.C">实际工作中心</@label></th>
                <th width="120"><@label key='startTime.C'>开始时间</@label></th>
                <th width="120"><@label key='endTime.C'>结束时间</@label></th>
                <th width="80"><@label key='materialCode.C'>物料编号</@label></th>
                <th width="80"><@label key='materialText.C'>物料描述</@label></th>
            </tr>
        </thead>
        <tbody id="shiftings">
        <#list shifting as shift>
            <tr>
                <td>${shift.personnelCode!''}<input type="hidden" name="performances[${shift_index}].personnelCode" value="${shift.personnelCode!''}" /></td>
                <td>${shift.personnelName!''}<input type="hidden" name="performances[${shift_index}].shiftingId" value="${shift.id!''}" /></td>
                <td><input class="required number" type="text" style="width:50px" min="1" maxlength="15" name="performances[${shift_index}].quantity" value="${performance.quantity!''}"/></td>
                <td><input type="text" name="performances[${shift_index}].memo"  value="${performance.memo!''}"/></td>
                <td>${shift.personnelTypeCode!''}<input type="hidden" name="performances[${shift_index}].personnelTypeCode" value="${shift.personnelTypeCode!''}" /></td>
                <td>${shift.personnelTypeText!''}</td>
                <td>${shift.shiftingWorkcenterCode!''} <input type="hidden" name="performances[${shift_index}].shiftingWorkCenterCode" value="${shift.shiftingWorkcenterCode!''}" /></td>
                <td>${(shift.startDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}<input type="hidden" name="performances[${shift_index}].startDatetime" value="${(shift.startDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" /></td>
                <td>${(shift.endDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}<input type="hidden" name="performances[${shift_index}].endDatetime" value="${(shift.endDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" /></td>
                <td>${shift.materialCode!''} <input type="hidden" name="performances[${shift_index}].materialCode" value="${shift.materialCode!''}" /></td>
                <td>${shift.materialText!''}</td>
            </tr>
        </#list>
        </tbody>
    </table>
    <div class="formBar">
        <ul>
            <li><div class="buttonActive"><div class="buttonContent"><button type="submit"><@label key="save.B">保存</@label></button></div></div></li>
            <li>
                <div class="buttonActiveGrey"><div class="buttonContent"><button type="button" class="close" ><@label key="cancel.B">取消</@label></button></div></div>
            </li>
        </ul>
    </div>
</form>
</div>
<script type="text/javascript">
    $(function(){
        $("button.close").click(function(){
            $.pdialog.closeCurrent();
            return false;
        });
    })
</script>